<app-manager-top></app-manager-top>
<app-manager-side-nav></app-manager-side-nav>
<div id="page-wrapper">
    <div id="page-inner">
        <div class="row">
            <div class="col-md-12">
                <h1 class="page-header">
                    订单管理
                </h1>
            </div>
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="option-field">
                                <!--  search box -->
                                <div class="search-box">
                                    <label for="search-input">订单ID搜索:&nbsp;&nbsp;</label>
                                    <input id="search-input" type="text" [(ngModel)]="inputOrderId"
                                           (input)="searchOrderId()">
                                </div>
                                <input type="button" (click)="searchOrderId()" value="查询">
                            </div>
                            <div class="info-field grid-container">
                                <table>
                                    <thead>
                                    <tr>
                                        <th>OrderId</th>
                                        <th>User Name</th>
                                        <th>Total Price</th>
                                        <th>Status</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <ng-template ngFor let-orderInfo [ngForOf]="orderVO?.orderInfoList" let-i="index">
                                        <tr *ngIf="!deleteOrder.includes(orderInfo?.oderId)" id="{{i}}">
                                            <td><input type="text" value="{{orderInfo?.oderId}}"/></td>
                                            <td><input type="text" value="{{orderInfo?.username}}"></td>
                                            <td><input type="text" value="{{orderInfo?.totalPrice}}"></td>
                                            <td><input type="text" value="{{orderInfo?.status}}"></td>
                                            <td>
                                                <div class="operator">
                                                    <button id="save-button" class="operator-enabled" (click)="saveRow(orderInfo?.oderId)">
                                                        通过
                                                    </button>
                                                    <button id="delete-button" class="operator-enabled" (click)="dropRow(orderInfo?.oderId)">
                                                        删 除
                                                    </button>
                                                </div>
                                            </td>
                                        </tr>
                                    </ng-template>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <footer>
        </footer>
    </div>
</div>
